/*
 * XML Type:  PositionStock
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.PositionStock
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML PositionStock(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class PositionStockImpl extends net.ofx.types.x2003.x04.impl.AbstractPositionBaseImpl implements net.ofx.types.x2003.x04.PositionStock
{
    
    public PositionStockImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName UNITSSTREET$0 = 
        new javax.xml.namespace.QName("", "UNITSSTREET");
    private static final javax.xml.namespace.QName UNITSUSER$2 = 
        new javax.xml.namespace.QName("", "UNITSUSER");
    private static final javax.xml.namespace.QName REINVDIV$4 = 
        new javax.xml.namespace.QName("", "REINVDIV");
    
    
    /**
     * Gets the "UNITSSTREET" element
     */
    public java.lang.String getUNITSSTREET()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNITSSTREET$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "UNITSSTREET" element
     */
    public net.ofx.types.x2003.x04.PositiveQuantityType xgetUNITSSTREET()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PositiveQuantityType target = null;
            target = (net.ofx.types.x2003.x04.PositiveQuantityType)get_store().find_element_user(UNITSSTREET$0, 0);
            return target;
        }
    }
    
    /**
     * True if has "UNITSSTREET" element
     */
    public boolean isSetUNITSSTREET()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(UNITSSTREET$0) != 0;
        }
    }
    
    /**
     * Sets the "UNITSSTREET" element
     */
    public void setUNITSSTREET(java.lang.String unitsstreet)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNITSSTREET$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(UNITSSTREET$0);
            }
            target.setStringValue(unitsstreet);
        }
    }
    
    /**
     * Sets (as xml) the "UNITSSTREET" element
     */
    public void xsetUNITSSTREET(net.ofx.types.x2003.x04.PositiveQuantityType unitsstreet)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PositiveQuantityType target = null;
            target = (net.ofx.types.x2003.x04.PositiveQuantityType)get_store().find_element_user(UNITSSTREET$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.PositiveQuantityType)get_store().add_element_user(UNITSSTREET$0);
            }
            target.set(unitsstreet);
        }
    }
    
    /**
     * Unsets the "UNITSSTREET" element
     */
    public void unsetUNITSSTREET()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(UNITSSTREET$0, 0);
        }
    }
    
    /**
     * Gets the "UNITSUSER" element
     */
    public java.lang.String getUNITSUSER()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNITSUSER$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "UNITSUSER" element
     */
    public net.ofx.types.x2003.x04.PositiveQuantityType xgetUNITSUSER()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PositiveQuantityType target = null;
            target = (net.ofx.types.x2003.x04.PositiveQuantityType)get_store().find_element_user(UNITSUSER$2, 0);
            return target;
        }
    }
    
    /**
     * True if has "UNITSUSER" element
     */
    public boolean isSetUNITSUSER()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(UNITSUSER$2) != 0;
        }
    }
    
    /**
     * Sets the "UNITSUSER" element
     */
    public void setUNITSUSER(java.lang.String unitsuser)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(UNITSUSER$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(UNITSUSER$2);
            }
            target.setStringValue(unitsuser);
        }
    }
    
    /**
     * Sets (as xml) the "UNITSUSER" element
     */
    public void xsetUNITSUSER(net.ofx.types.x2003.x04.PositiveQuantityType unitsuser)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PositiveQuantityType target = null;
            target = (net.ofx.types.x2003.x04.PositiveQuantityType)get_store().find_element_user(UNITSUSER$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.PositiveQuantityType)get_store().add_element_user(UNITSUSER$2);
            }
            target.set(unitsuser);
        }
    }
    
    /**
     * Unsets the "UNITSUSER" element
     */
    public void unsetUNITSUSER()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(UNITSUSER$2, 0);
        }
    }
    
    /**
     * Gets the "REINVDIV" element
     */
    public net.ofx.types.x2003.x04.BooleanType.Enum getREINVDIV()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REINVDIV$4, 0);
            if (target == null)
            {
                return null;
            }
            return (net.ofx.types.x2003.x04.BooleanType.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "REINVDIV" element
     */
    public net.ofx.types.x2003.x04.BooleanType xgetREINVDIV()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(REINVDIV$4, 0);
            return target;
        }
    }
    
    /**
     * True if has "REINVDIV" element
     */
    public boolean isSetREINVDIV()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(REINVDIV$4) != 0;
        }
    }
    
    /**
     * Sets the "REINVDIV" element
     */
    public void setREINVDIV(net.ofx.types.x2003.x04.BooleanType.Enum reinvdiv)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REINVDIV$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(REINVDIV$4);
            }
            target.setEnumValue(reinvdiv);
        }
    }
    
    /**
     * Sets (as xml) the "REINVDIV" element
     */
    public void xsetREINVDIV(net.ofx.types.x2003.x04.BooleanType reinvdiv)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.BooleanType target = null;
            target = (net.ofx.types.x2003.x04.BooleanType)get_store().find_element_user(REINVDIV$4, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.BooleanType)get_store().add_element_user(REINVDIV$4);
            }
            target.set(reinvdiv);
        }
    }
    
    /**
     * Unsets the "REINVDIV" element
     */
    public void unsetREINVDIV()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(REINVDIV$4, 0);
        }
    }
}
